home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / CUCD / Graphics / Ghostscript / source / icie.h < prev    next >
Encoding:
Text File  |  1995-11-14  |  2.9 KB  |  73 lines

  1. /* Copyright (C) 1995 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* icie.h */
  20. /* Internal definitions for interpreter CIE color handling */
  21.  
  22. /*
  23.  * All of the routines below are exported by zcie.c for zcrd.c,
  24.  * except for cie_cache_joint which is exported by zcrd.c for zcie.c.
  25.  */
  26.  
  27. /* ------ Parameter acquisition ------ */
  28.  
  29. /* Get a range array parameter from a dictionary. */
  30. /* We know that count <= 4. */
  31. int dict_ranges_param(P4(const ref *pdref, const char _ds *kstr, int count,
  32.   gs_range *prange));
  33.  
  34. /* Get 3 ranges from a dictionary. */
  35. #define dict_range3_param(pdref, kstr, prange3)\
  36.   dict_ranges_param(pdref, kstr, 3, (prange3)->ranges)
  37.  
  38. /* Get a 3x3 matrix parameter from a dictionary. */
  39. #define dict_matrix3_param(op, kstr, pmat)\
  40.     dict_float_array_param(op, kstr, 9, (float *)pmat, (const float *)&Matrix3_default)
  41. #define matrix3_ok 9
  42.  
  43. /* Get an array of procedures from a dictionary. */
  44. /* We know count <= countof(empty_procs). */
  45. int dict_proc_array_param(P4(const ref *pdict, const char _ds *kstr,
  46.   uint count, ref *pparray));
  47.  
  48. /* Get 3 procedures from a dictionary. */
  49. #define dict_proc3_param(op, kstr, pparray)\
  50.   dict_proc_array_param(op, kstr, 3, pparray)
  51.  
  52. /* Get WhitePoint and BlackPoint values. */
  53. int cie_points_param(P2(const ref *pdref, gs_cie_wb *pwb));
  54.  
  55. /* Process a 3- or 4-dimensional lookup table from a dictionary. */
  56. /* The caller has set pclt->n and pclt->m. */
  57. /* ptref is known to be a readable array of size at least n+1. */
  58. int cie_table_param(P3(const ref *ptable, gx_color_lookup_table *pclt,
  59.   gs_memory_t *mem));
  60.  
  61. /* ------ Internal routines ------ */
  62.  
  63. int cie_cache_push_finish(P3(int (*)(P1(os_ptr)), gs_state *, void *));
  64. int cie_prepare_cache(P6(const gs_range *, const ref *,
  65.   cie_cache_floats *, void *, const gs_state *, client_name_t));
  66. int cie_prepare_caches_3(P8(const gs_range3 *, const ref *,
  67.   cie_cache_floats *, cie_cache_floats *, cie_cache_floats *,
  68.   void *, const gs_state *, client_name_t));
  69. #define cie_prepare_cache3(d3,p3,c3,pcie,pgs,cname)\
  70.   cie_prepare_caches_3(d3, p3, &(c3)->floats, &(c3)[1].floats, &(c3)[2].floats, pcie, pgs, cname)
  71.  
  72. int cie_cache_joint(P2(const ref_cie_render_procs *, gs_state *));
  73.